package com.sunthy.mall.model.admin.vo.order;

/**
 * 这是根据页码展示order的一个bean类
 */
public class OrdersByPageInnerOrderVO {

    private Double amount;          // 商品价格
    private Integer goodsDetailId;  // 商品的规格id
    private Integer stateId;        // order状态码
    private String goods;           // 商品name
    private Integer id;             // order的id
    private String state;           // order状态码的name
    private Integer userId;         // user的id
    private Integer goodsNum;       // 商品的数量
    private String spec;            // 商品的规格
    private OrdersByPageInnerOrderUserVO user = new OrdersByPageInnerOrderUserVO(); // 用户的详细信息

    private String nickname;

    private String name;

    private String address;

    private String phone;

    public void setNickname(String nickname) {
//       this.nickname = nickname;
        user.setNickname(nickname);
    }

    public void setName(String name) {
//        this.name = name;
        user.setName(name);
    }

    public void setAddress(String address) {
//        this.address = address;
        user.setAddress(address);
    }

    public void setPhone(String phone) {
//        this.phone = phone;
        user.setPhone(phone);
    }

    public Double getAmount() {
        return amount;
    }

    public void setAmount(Double amount) {
        this.amount = amount;
    }

    public Integer getGoodsDetailId() {
        return goodsDetailId;
    }

    public void setGoodsDetailId(Integer goodsDetailId) {
        this.goodsDetailId = goodsDetailId;
    }

    public Integer getStateId() {
        return stateId;
    }

    public void setStateId(Integer stateId) {
        this.stateId = stateId;
        if(stateId == 0){
            setState("未付款");
        }else if(stateId == 1){
            setState("未发货");
        }else if(stateId == 2){
            setState("已发货");
        }else if(stateId == 3){
            setState("已到货");
        }
    }

    public String getGoods() {
        return goods;
    }

    public void setGoods(String goods) {
        this.goods = goods;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getGoodsNum() {
        return goodsNum;
    }

    public void setGoodsNum(Integer goodsNum) {
        this.goodsNum = goodsNum;
    }

    public String getSpec() {
        return spec;
    }

    public void setSpec(String spec) {
        this.spec = spec;
    }

    public OrdersByPageInnerOrderUserVO getUser() {
        return user;
    }

    public void setUser(OrdersByPageInnerOrderUserVO user) {
        this.user = user;
    }
}
